<template>
<el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="id"
        label="ID"
        width="180">
      </el-table-column>
      <el-table-column
        prop="name"
        label="姓名"
        width="180">
      </el-table-column>
      <el-table-column
        prop="phone"
        label="电话号码"
        width="180">
      </el-table-column>
      <el-table-column
        prop="sex"
        label="性别"
        width="180">
      </el-table-column>
    </el-table>
</template>

<script>
import { listPerson } from "@/api/my/person";
export default {
  data() {
    return {
      tableData: []
    }
  },
  created() {
            this.getList();
        },
      methods: {
        /** 查询列表 */
        getList() {
          listPerson().then(response => {
                console.log(response)
                this.tableData = response;
            });
        },
      }
}
</script>